<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<fmt:setBundle basename="ApplicationResources" />
<title><fmt:message key="label.crudschedule" /> </title>
<script type="text/javascript" src="/phoenix/js/jquery-1.2.3.min.js"></script>
<script type="text/javascript" src="/phoenix/js/windowmsg/jquery.windowmsg-1.0.js"></script>
<script type="text/javascript" src="/phoenix/js/select-user.js"></script>
<script type="text/javascript" src="/phoenix/js/select-schedule.js"></script>
</head>
<body>
<form action="${pageContext.request.contextPath}/controller/selectschedule"
		method=get>
		Please enter a date (mm/dd/yy)
		<input type="text" name="date" value=""/> 
		<input type="submit"/>

</form>

	<table> 
	
		<c:forEach var="slot" items="${slots}" varStatus="status">
			<tr> 
			  <td> 
			  <c:choose>
			  		<c:when test="${slot.key == 0}">
				       00:00 to 01:00
				    </c:when>
				    <c:when test="${slot.key == 1}">
				       01:00 to 02:00
				    </c:when>
				    <c:when test="${slot.key == 2}">
				       02:00 to 03:00
				    </c:when>
				    <c:when test="${slot.key == 3}">
				       03:00 to 02:00
				    </c:when>
				    <c:when test="${slot.key == 4}">
				       04:00 to 05:00
				    </c:when>
				    <c:when test="${slot.key == 5}">
				       05:00 to 06:00
				    </c:when>
				    <c:when test="${slot.key == 6}">
				       06:00 to 07:00
				    </c:when>
				    <c:when test="${slot.key == 7}">
				       07:00 to 08:00
				    </c:when>
				    <c:when test="${slot.key == 8}">
				       08:00 to 09:00
				    </c:when>
				    <c:when test="${slot.key == 9}">
				       09:00 to 10:00
				    </c:when>
				    <c:when test="${slot.key == 10}">
				       10:00 to 11:00
				    </c:when>
				    <c:when test="${slot.key == 11}">
				       11:00 to 12:00
				    </c:when>
				    <c:when test="${slot.key == 12}">
				      12:00 to 13:00
				    </c:when>
				    <c:when test="${slot.key == 13}">
				       13:00 to 14:00
				    </c:when>
				    <c:when test="${slot.key == 14}">
				       14:00 to 15:00
				    </c:when>
				    <c:when test="${slot.key == 15}">
				       15:00 to 16:00
				    </c:when>
				     <c:when test="${slot.key == 16}">
				       16:00 to 17:00
				    </c:when>
				     <c:when test="${slot.key == 17}">
				       17:00 to 18:00
				    </c:when>
				     <c:when test="${slot.key == 18}">
				       18:00 to 19:00
				    </c:when>
				     <c:when test="${slot.key == 19}">
				       19:00 to 20:00
				    </c:when>
				     <c:when test="${slot.key == 20}">
				       20:00 to 21:00
				    </c:when>
				     <c:when test="${slot.key == 21}">
				       21:00 to 22:00
				    </c:when>
				     <c:when test="${slot.key == 22}">
				       22:00 to 23:00
				    </c:when>
				    <c:when test="${slot.key == 23}">
				       23:00 to 00:00
				    </c:when>
			
			</c:choose>
			    
			    
			  </td>
			  <td> 
			    <c:if test='${slot.value.status =="1"}'>
			    	<input type="button" name="select" value="select" disabled="disabled" class="row${status.index}"/> 
			    </c:if>
			  
			     <c:if test='${slot.value.status =="0"}'>
			    	<input type="button" name="select" value="select" class="row${status.index}"/> 
			    </c:if>
			    <input type="hidden" value="" id="row${status.index}" data-start="${slot.value.startdate}" data-end="${slot.value.enddate}"/>
			   </td>	
			   
			   <td> 
			   	
			   </td>	
			   <td> 
			   	
			   </td>		
			</tr>		
		</c:forEach>
	
	
	</table>
</body>
</html>